public class QueryRoomForEmptyServlet extends HttpServlet{
	private BllFactory bllFactory = BllFactory.getBllFactory();

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		resp.setCharacterEncoding("utf-8");
		resp.setContentType("text/html;charset = utf-8");
		int type =Integer.parseInt(req.getParameter("type"));
		int roomtype = Integer.parseInt(req.getParameter("content"));
		System.out.println("roomtype="+roomtype);
		BLLRoom bllRoom = bllFactory.getInstance(BLLRoom.class);
		
		List<Room> list = bllRoom.queryRoomForEmpty(roomtype,type);
		System.out.println("list!!!!!"+list);
		JSONArray json = JSONArray.fromObject(list);
		System.out.println(json);
		PrintWriter pw = resp.getWriter();
		pw.print(json);
		pw.close();
	}
	
	
}